<template>
  <div class="top-nav">
    <div class="container clearf">
      <div class="left">
        <router-link to="/main"><a class="item">首页</a></router-link>
      </div>
      <div class="right">

        <template v-if="account.account_userid !== undefined">
          <router-link to="/orders/listOrder"><a href="#" class="item">我的订单</a></router-link>
          <a @click="signOff" class="item">退出登录</a>
          <router-link to="/account/myAccountForm"><a href="#" class="item">个人主页</a></router-link>
        </template>

        <template v-else>
          <router-link to="/orders/listOrder"><a href="#" class="item">我的订单</a></router-link>
          <router-link to="/account/registerForm"><a href="#" class="item">注册</a></router-link>
          <router-link to="/account/signonForm"><a href="#" class="item">登录</a></router-link>
        </template>

      </div>
    </div>
    <div class="header">
      <div class="container clearf">
        <div class="col-2 logo">宠物商店</div>
        <div class="col-5 search-bar">

          <!--搜索栏目-->
          <form action="searchProduct" method="post" @submit.prevent="searchProducts">
            <input type="text"  id="keyword" name="keyword" size="14" v-model="searchKeyword"  />
            <router-link to="/catalog/SearchProducts" @click="searchProducts()">
            <button type="submit" name="searchProducts" value="Search">搜索</button>
            </router-link>
          </form>

          <div id="productAutoComplete" class="productAutoComplete">
            <ul id="productAutoList" class="productAutoList">
            </ul>
          </div>

        </div>

        <div class="col-2 cart">
          <router-link to="/cart/cart"><a href="#" class="item">我的购物车</a></router-link>
        </div>

      </div>
    </div>
    <div class="main-promote">
     <!--以上是头部信息-->

  <div class="container clearf">
    <div class="col-2 cat" >
      <ul>
        <li>
          <font color="white">宠物鱼</font>

          <div class="div1">
            <div class="av" >
              <img src="../../assets/images/fishMain4.png" alt="锦鲤" title="锦鲤"  />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('JL-01')">
              <strong>锦鲤</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/fishMain2.jpg" alt="财神鹦鹉" title="财神鹦鹉"  />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('YW-02')">
              <strong>财神鹦鹉</strong>
            </router-link>

            <br />

            <div class="av" >
              <img src="../../assets/images/fishMain3.jpg" alt="六角恐龙鱼" title="六角恐龙鱼"  />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('LJKLY-03')">
              <strong>六角恐龙鱼</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/fishMain.png" alt="孔雀鱼" title="孔雀鱼"  />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('KQY-04')">
              <strong>孔雀鱼</strong>
            </router-link>
          </div>
        </li>
        <li>
          <font color="white">宠物狗</font>
          <div class="div2">
            <div class="av" >
              <img src="../../assets/images/DogMain.jpg" alt="金毛" title="金毛" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('JM-01')">
              <strong>金毛</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/DogMain2.jpg" alt="哈士奇" title="哈士奇" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('HSQ-02')">
              <strong>哈士奇</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/DogMain3.jpg" alt="柴犬" title="柴犬" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('CQ-03')">
              <strong>柴犬</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/DogMain4.jpg" alt="拉布拉多" title="拉布拉多" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('LBLD-04')">
              <strong>拉布拉多</strong>
            </router-link>
          </div>
        </li>
        <li>
          <font color="white">宠物猫</font>
          <div class="div1">
            <div class="av" >
              <img src="../../assets/images/CatMain.jpg" alt="英国短毛猫" title="英国短毛猫" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('YGDMM-01')">
              <strong>英国短毛猫</strong>
            </router-link>
            <br />
            <div class="av" >
              <img src="../../assets/images/CatMain2.png" alt="布偶猫" title="布偶猫" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('BOM-02')">
              <strong>布偶猫</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/CatMain3.jpg" alt="俄罗斯蓝猫" title="俄罗斯蓝猫" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('ELSLM-03')">
              <strong>俄罗斯蓝猫</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/CatMain4.jpeg" alt="中华田园猫" title="中华田园猫" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('ZHTYM-04')">
              <strong>中华田园猫</strong>
            </router-link>
          </div>
        </li>

        <li>
          <font color="white">爬行动物</font>
          <div class="div2">
            <div class="av" >
              <img src="../../assets/images/turtleMain.jpg" alt="巴西龟" title="巴西龟" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('BXG-01')">
              <strong>巴西龟</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/turtleMain2.jpg" alt="圆澳龟" title="圆澳龟" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('YAG-02')">
              <strong>圆澳龟</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/spiderMain.jpg" alt="小蜘蛛" title="小蜘蛛" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('XZZ-03')">
              <strong>小蜘蛛</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/LizardMain.jpeg" alt="守宫" title="守宫" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('SG-04')">
              <strong>守宫</strong>
            </router-link>
          </div>
        </li>
        <li>
          <font color="white">宠物鸟</font>
          <div class="div2">
            <div class="av" >
              <img src="../../assets/images/baiWenBirdMain.jpg" alt="白文鸟" title="白文鸟" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('BWN-01')">
              <strong>白文鸟</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/fuRongBirdMain.png" alt="芙蓉鸟" title="芙蓉鸟" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('FRN-02')">
              <strong>芙蓉鸟</strong>
            </router-link>
            <br />

            <div class="av" >
              <img src="../../assets/images/owlMain.jpeg"  alt="猫头鹰" title="猫头鹰" />
            </div>
            <router-link to="/catalog/Product" @click="handleImageClick('MTY-03')">
              <strong>猫头鹰</strong>
            </router-link>
            <br />

            <div class="av">
              <img src="../../assets/images/parrotMain.jpg"  alt="牡丹鹦鹉" title="牡丹鹦鹉" />
            </div>
            <router-link to="/catalog/Product">
              <strong>牡丹鹦鹉</strong>
            </router-link>

            </div>


<!--          <div class="col-2 item">-->
<!--            <div class="card">-->
<!--              <router-link to="/catalog/Product" @click="handleImageClick('LJKLY-03')">-->
<!--                <img src="../../assets/images/fishMain3.jpg" alt="六角恐龙鱼" title="六角恐龙鱼" height="300" class="LJKLY-03" @mouseover="overFn1" @mouseout="outFn1" />-->
<!--              </router-link>-->
<!--            </div>-->
<!--          </div>-->


        </li>
      </ul>
    </div>
    <div class="col-6">
      <div class="slider">
        <img src="../../assets/images/PetStoreTitleMain.jpeg" alt="首页图" height="250">
      </div>
    </div>
    <div class="col-2 info">
      <div class="auth clearf">
        <div class="avatar"><img src="../../assets/images/piKaQiu.jpeg" alt="皮卡丘" title="皮卡丘" /></div>
        <b>你好，欢迎来到JpetStore.</b>
      </div>
      <div class="anno">
        <div class="title"><b>宠物物语</b></div>
        <div class="content">
          1.每天趴在窗户边等你回来，是我一天当中最快乐的一刻。
          <br>
          2.你小心翼翼绽放的微笑，脆弱又美好，让我毫不设防地走进你。
          <br>
          3.对一只狗好，也许只花你一部分的时间，而它，却将一辈子回报于你。
        </div>
      </div>
    </div>
  </div>
  </div>

  <div id="inform"></div>

  <div class="container clearf">
    <div class="cat-promote">
      <div class="title">宠物鱼</div>
      <div class="content">
        <div class="col-3 item">

          <div class="card">
          <router-link to="/catalog/Product">
            <img src="../../assets/images/fishMain4.png" @click="handleImageClick('YW-02')" alt="锦鲤" title="锦鲤" height="300" class="JL-01" @mouseover="overFn1" @mouseout="outFn1" />
          </router-link>
          </div>

        </div>

        <div class="col-3 item">

          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('YW-02')">
              <img src="../../assets/images/fishMain2.jpg" alt="财神鹦鹉" title="财神鹦鹉" height="300" class="YW-02" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('LJKLY-03')">
              <img src="../../assets/images/fishMain3.jpg" alt="六角恐龙鱼" title="六角恐龙鱼" height="300" class="LJKLY-03" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('KQY-04')">
              <img src="../../assets/images/fishMain.png" alt="孔雀鱼" title="孔雀鱼" height="300" class="KQY-04" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

      </div>
    </div>
    <div class="cat-promote">
      <div class="title">宠物狗</div>
      <div class="content">
        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('JM-01')">
              <img src="../../assets/images/DogMain.jpg" alt="金毛" title="金毛" height="300" class="JM-01" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('HSQ-02')">
              <img src="../../assets/images/DogMain2.jpg" alt="哈士奇" title="哈士奇" height="300" class="HSQ-02" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('CQ-03')">
              <img src="../../assets/images/DogMain3.jpg" alt="柴犬" title="柴犬" height="300" class="CQ-03" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('LBLD-04')">
              <img src="../../assets/images/DogMain4.jpg" alt="拉布拉多" title="拉布拉多" height="300" class="LBLD-04" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>
      </div>
    </div>


    <div class="cat-promote">
      <div class="title">宠物猫</div>
      <div class="content">
        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('ZHTYM-04')">
              <img src="../../assets/images/CatMain.jpg" alt="英国短毛猫" title="英国短毛猫" height="300" class="ZHTYM-04" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('YGDMM-01')">
              <img src="../../assets/images/CatMain2.png" alt="布偶猫" title="布偶猫" height="300" class="YGDMM-01" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('BOM-02')">
              <img src="../../assets/images/CatMain3.jpg" alt="俄罗斯蓝猫" title="俄罗斯蓝猫" height="300" class="BOM-02" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('ELSLM-03')">
              <img src="../../assets/images/CatMain4.jpeg" alt="中华田园猫" title="中华田园猫" height="300" class="ELSLM-03" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>
      </div>
    </div>

    <div class="cat-promote">
      <div class="title">爬行动物</div>
      <div class="content">
        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('BXG-01')">
              <img src="../../assets/images/turtleMain.jpg" alt="巴西龟" title="巴西龟" height="300" class="BXG-01" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('YOG-02')">
              <img src="../../assets/images/turtleMain2.jpg" alt="圆澳龟" title="圆澳龟" height="300" class="YOG-02" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('XZZ-03')">
              <img src="../../assets/images/spiderMain.jpg" alt="小蜘蛛" title="小蜘蛛" height="300" class="XZZ-03" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>

        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('SG-04')">
              <img src="../../assets/images/LizardMain.jpeg" alt="守宫" title="守宫" height="300" class="SG-04" @mouseover="overFn1" @mouseout="outFn1" />
            </router-link>
          </div>
        </div>
      </div>
    </div>


    <div class="cat-promote">
      <div class="title">宠物鸟</div>
      <div class="content">
        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('BWN-01')" @mouseover="overFn1" @mouseout="outFn1">
              <img src="../../assets/images/baiWenBirdMain.jpg" alt="白文鸟" title="白文鸟" height="300" class="BWN-01" />
            </router-link>
          </div>
        </div>
        <div class="col-3 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('FRN-02')" @mouseover="overFn1" @mouseout="outFn1">
              <img src="../../assets/images/fuRongBirdMain.png" alt="芙蓉鸟" title="芙蓉鸟" height="300" class="FRN-02" />
            </router-link>
          </div>
        </div>
        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('MTY-03')" @mouseover="overFn1" @mouseout="outFn1">
              <img src="../../assets/images/owlMain.jpeg" alt="猫头鹰" title="猫头鹰" height="300" class="MTY-03" />
            </router-link>
          </div>
        </div>
        <div class="col-2 item">
          <div class="card">
            <router-link to="/catalog/Product" @click="handleImageClick('MDYW-04')" @mouseover="overFn1" @mouseout="outFn1">
              <img src="../../assets/images/parrotMain.jpg" alt="牡丹鹦鹉" title="牡丹鹦鹉" height="300" class="MDYW-04" />
            </router-link>
          </div>
        </div>
      </div>
  </div>
  </div>
  </div>

  <div class="footer">
    <div class="container clearf">
      <div class="">

        增值电信业务经营许可证：浙B2-20080224|增值电信业务经营许可证（跨地区）： B2-20150210|浙网文【2022】0403-017号|浙江省网络食品销售第三方平台提供者备案：浙网食A33010001|

        互联网药品信息服务资格证书（浙）-经营性-2018-0010|短消息类服务接入代码使用证书：号【2016】00154-A01|信息网络传播视听许可证：1109364号|出版物网络交易平台服务经营备案号：新出发浙备字第002号|</div>
    </div>
  </div>

</template>

<script setup>

import axios from 'axios';
import api from "../../api/index";
import {onMounted, reactive,ref} from "vue";
import {useStore} from "vuex";
// import product from "./Product";
import { RouterLink, useRouter } from "vue-router";
const store = useStore()
// import { ref } from 'vue'

const searchKeyword = ref('')
const router = useRouter();

//搜索部分内容
function searchProducts() {
  // 这里写提交搜索的逻辑代码，使用searchKeyword.value获取搜索关键字
  console.log(searchKeyword.value);
  api.getSearchResult(searchKeyword.value).then(res => {
    //这里首先要判断一下状态码
    console.log("好好回去");
    var statusCode = res.data.status;
    console.log("statusCode is : " + statusCode);
  })
}

const item1Session = reactive([])//这是一个数组
const item1_form = reactive({
  itemId:'',
  productId:'',
  listPrice:'',
  unitCost: '',
  supplierId: '',
  status: '',
  attribute1:'',
  attribute2:'',
  attribute3:'',
  attribute4:'',
  attribute5:''
})

const item2Session = reactive([])//这是一个数组
const item2_form = reactive({
  itemId2:'',
  productId2:'',
  listPrice2:'',
  unitCost2: '',
  supplierId2: '',
  status2: '',
  attribute12:'',
  attribute22:'',
  attribute32:'',
  attribute42:'',
  attribute52:''
})

const account = reactive({
  account_userid:'0',
  account_email:'',
  account_firstname:'',
  account_lastname:'',
  account_status:'',
  account_addr1:'',
  account_addr2:'',
  account_city:'',
  account_state:'',
  account_zip:'',
  account_country:'',
  account_phone:'',
  account_favCategory:''
})

// const productSession = reactive([])//这是一个数组
//
// const product_form = reactive({
//   productId: '',
// })

onMounted(() => {
  console.log("huhu")
  console.log(store.state.account_userid);
  account.account_userid=store.state.account_userid;
  account.account_email=store.state.account_email;
  account.account_firstname=store.state.account_firstname;
  account.account_lastname=store.state.account_lastname;
  account.account_status=store.state.account_status;
  account.account_addr1=store.state.account_addr1;
  account.account_addr2=store.state.account_addr2;
  account.account_city=store.state.account_city;
  account.account_state=store.state.account_state;
  account.account_zip=store.state.account_zip;
  account.account_country=store.state.account_country;
  account.account_phone=store.state.account_phone;
  account.account_favCategory=store.state.account_favCategory;
  console.log(account.account_userid);
})

const signOff = () =>{
  //清除客户端的session
  store.commit("setAccountUserid",'');
  store.commit("setAccountEmail",'');
  store.commit("setAccountFirstName",'');
  store.commit("setAccountLastName",'');
  store.commit("setAccountStatus",'');
  store.commit("setAccountAddr1",'');
  store.commit("setAccountAddr2",'');
  store.commit("setAccountCity",'');
  store.commit("setAccountState",'');
  store.commit("setAccountZip",'');
  store.commit("setAccountCountry",'');
  store.commit("setAccountPhone",'');
  store.commit("setAccountfavCategory",'');
  //清楚服务端的session，这里又要请求服务器了，我先不写吧。
  //清楚页面中的account
  account.account_userid=store.state.account_userid;
  account.account_email=store.state.account_email;
  account.account_firstname=store.state.account_firstname;
  account.account_lastname=store.state.account_lastname;
  account.account_status=store.state.account_status;
  account.account_addr1=store.state.account_addr1;
  account.account_addr2=store.state.account_addr2;
  account.account_city=store.state.account_city;
  account.account_state=store.state.account_state;
  account.account_zip=store.state.account_zip;
  account.account_country=store.state.account_country;
  account.account_phone=store.state.account_phone;
  account.account_favCategory=store.state.account_favCategory;
  //重返本页面
  // 使用 location.reload() 方法重新刷新页面
  location.reload();
}


function handleImageClick(productId) {
  console.log("hhhh");
  //测试后端向前端传数据，成功！
  api.setProductSession(productId).then(res => {

    //这里首先要判断一下状态码
    var statusCode = res.data.status;
    console.log("statusCode is : " + statusCode);
    //在前端对session进行存储
    // item1Session.splice(0, item1Session.length)//清空旧数据
    // console.log(res.data.data[0])
    // item1Session.push(res.data.data[0]);//update,from date results,第一个data是http里的，这个data包括我们的status,message和data。第二个data是我们commonResponse里面的，存的就是orderList.
    // item2Session.push(res.data.data[1]);
    // console.log("session: "+item1Session);
    // console.log("attr1session: "+item1Session[0].attribute1);
    // console.log("attr1session: "+item2Session[0].attribute1);
    // //存给order_form
    // item1_form.productId=item1Session[0].productId;
    // item1_form.unitCost=item1Session[0].unitCost;
    // item1_form.itemId=item1Session[0].itemId;
    // item1_form.status=item1Session[0].status;
    // item1_form.listPrice=item1Session[0].listPrice;
    // item1_form.supplierId=item1Session[0].supplierId;
    // item1_form.attribute1=item1Session[0].attribute1;
    // item1_form.attribute2=item1Session[0].attribute2;
    // item1_form.attribute3=item1Session[0].attribute3;
    // item1_form.attribute4=item1Session[0].attribute4;
    // item1_form.attribute5=item1Session[0].attribute5;
    //
    // item2_form.productId2=item2Session[0].productId;
    // item2_form.unitCost2=item2Session[0].unitCost;
    // item2_form.itemId2=item2Session[0].itemId;
    // item2_form.status2=item2Session[0].status;
    // item2_form.listPrice2=item2Session[0].listPrice;
    // item2_form.supplierId2=item2Session[0].supplierId;
    // item2_form.attribute12=item2Session[0].attribute1;
    // item2_form.attribute22=item2Session[0].attribute2;
    // item2_form.attribute32=item2Session[0].attribute3;
    // item2_form.attribute42=item2Session[0].attribute4;
    // item2_form.attribute52=item2Session[0].attribute5;
    // console.log("attr1session: "+item1Session[0].attribute1);
    // console.log("attr1session: "+item2Session[0].attribute1);
    // //测试成功
    // console.log(item1_form.itemId);
    // console.log(item2_form.itemId2);
    //
    // //存给ordersSession，持久化对象
    // store.commit("setItem1Price",item1Session[0].listPrice);
    // store.commit("setItem1Supplier",item1Session[0].supplierId);
    // store.commit("setItem1Attr1",item1Session[0].attribute1);
    // store.commit("setItem1Attr2",item1Session[0].attribute2);
    // store.commit("setItem1Attr3",item1Session[0].attribute3);
    // store.commit("setItem1Attr4",item1Session[0].attribute4);
    // store.commit("setItem1Attr5",item1Session[0].attribute5);
    // store.commit("setItem1UnitCost",item1Session[0].unitCost);
    // store.commit("setItem1State",item1Session[0].status);
    // store.commit("setItem1ItemId",item1Session[0].itemId);
    // store.commit("setItem1Product",item1Session[0].productId);
    //
    // store.commit("setItem2Price",item2Session[0].listPrice);
    // store.commit("setItem2Supplier",item2Session[0].supplierId);
    // store.commit("setItem2Attr1",item2Session[0].attribute1);
    // store.commit("setItem2Attr2",item2Session[0].attribute2);
    // store.commit("setItem2Attr3",item2Session[0].attribute3);
    // store.commit("setItem2Attr4",item2Session[0].attribute4);
    // store.commit("setItem2Attr5",item2Session[0].attribute5);
    // store.commit("setItem2UnitCost",item2Session[0].unitCost);
    // store.commit("setItem2State",item2Session[0].status);
    // store.commit("setItem2ItemId",item2Session[0].itemId);
    // store.commit("setItem2Product",item2Session[0].productId);
    //
    // console.log("store.state.productId"+store.state.productId);
    // console.log("store.state.itemId"+store.state.itemId);
    // console.log("store.state.productId2"+store.state.productId2);
    // console.log("store.state.itemId2"+store.state.itemId2);

  })

}
</script>
<style scoped >
@import "../../assets/css/TopButtomMain.css";
@import "../../assets/css/order.css";
</style>
